<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>FGElib: Fichero Fuente C:/dev/C++/proyectos/FGElib/FGElib.h</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generado por Doxygen 1.6.3 -->
<script type="text/javascript">
<!--
function changeDisplayState (e){
  var num=this.id.replace(/[^[0-9]/g,'');
  var button=this.firstChild;
  var sectionDiv=document.getElementById('dynsection'+num);
  if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
    sectionDiv.style.display='block';
    button.src='open.gif';
  }else{
    sectionDiv.style.display='none';
    button.src='closed.gif';
  }
}
function initDynSections(){
  var divs=document.getElementsByTagName('div');
  var sectionCounter=1;
  for(var i=0;i<divs.length-1;i++){
    if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
      var header=divs[i];
      var section=divs[i+1];
      var button=header.firstChild;
      if (button!='IMG'){
        divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
        button=document.createElement('img');
        divs[i].insertBefore(button,divs[i].firstChild);
      }
      header.style.cursor='pointer';
      header.onclick=changeDisplayState;
      header.id='dynheader'+sectionCounter;
      button.src='closed.gif';
      section.id='dynsection'+sectionCounter;
      section.style.display='none';
      section.style.marginLeft='14px';
      sectionCounter++;
    }
  }
}
window.onload = initDynSections;
-->
</script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Página&nbsp;principal</span></a></li>
      <li><a href="annotated.html"><span>Estructuras&nbsp;de&nbsp;Datos</span></a></li>
      <li class="current"><a href="files.html"><span>Archivos</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>Lista&nbsp;de&nbsp;archivos</span></a></li>
    </ul>
  </div>
<h1>C:/dev/C++/proyectos/FGElib/FGElib.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> Free Graphics Engine </span>
<a name="l00003"></a>00003 <span class="comment"> 0.0.1a</span>
<a name="l00004"></a>00004 <span class="comment"> dev.hddisseny</span>
<a name="l00005"></a>00005 <span class="comment"> 100510</span>
<a name="l00006"></a>00006 <span class="comment"> Framework completo de la libreria SDL para usar en VC Express 8.</span>
<a name="l00007"></a>00007 <span class="comment">                   Creado por dev.hddisseny - dev.hddisseny@gmail.com </span>
<a name="l00008"></a>00008 <span class="comment">*/</span>
<a name="l00009"></a>00009 
<a name="l00019"></a>00019 <span class="preprocessor">#ifndef FGELIB_H</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define FGELIB_H</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span>
<a name="l00022"></a>00022 <span class="preprocessor">#ifdef WIN32</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">        #pragma comment(lib, &quot;SDL.lib&quot;)</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">        #pragma comment(lib, &quot;SDLmain.lib&quot;)</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">        #pragma comment(lib, &quot;SDL_image.lib&quot;)</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">        #pragma comment(lib, &quot;SDL_mixer.lib&quot;)</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">    #pragma comment(lib, &quot;SDL_gfx.lib&quot;)</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">        #include &lt;SDL.h&gt;</span>
<a name="l00029"></a>00029 <span class="preprocessor">        #include &lt;SDL_image.h&gt;</span>
<a name="l00030"></a>00030 <span class="preprocessor">        #include &lt;SDL_rotozoom.h&gt;</span>
<a name="l00031"></a>00031 <span class="preprocessor">        #include &lt;SDL_mixer.h&gt;</span>
<a name="l00032"></a>00032 <span class="preprocessor">        #include &quot;FGElibDEF.h&quot;</span>
<a name="l00033"></a>00033 <span class="preprocessor">#endif</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span>
<a name="l00036"></a><a class="code" href="class_f_g_e___motion.html">00036</a> <span class="keyword">class </span><a class="code" href="class_f_g_e___motion.html" title="Clase encargada de el manejo del motor de la libreria.">FGE_Motion</a> 
<a name="l00038"></a>00038 {
<a name="l00039"></a>00039         <span class="keyword">private</span>:
<a name="l00040"></a>00040 <span class="comment">/* Variable -&gt; __pSurfaceBuffer - La superficie  */</span>
<a name="l00041"></a>00041                 FGE_Screen * __pSurfaceBuffer;
<a name="l00042"></a>00042 <span class="comment">/* Variable -&gt; __pEventKeyboard - Evento para el teclado  */</span>
<a name="l00043"></a>00043                 FGE_Status   __pEventKeyboard;
<a name="l00044"></a>00044 <span class="comment">/* Variable -&gt; __iKeyPress - Numero de tecla pulsado  */</span>
<a name="l00045"></a>00045                 <span class="keywordtype">int</span>                      __iKeyPress;
<a name="l00046"></a>00046 <span class="comment">/* Variable -&gt; __pEventMouse - Evento para el Mouse  */</span>
<a name="l00047"></a>00047                 FGE_Status   __pEventMouse;
<a name="l00048"></a>00048 <span class="comment">/* Variable -&gt; __iButtonPress - Numero de boton pulsado  */</span>
<a name="l00049"></a>00049                 <span class="keywordtype">int</span>          __iButtonPress;
<a name="l00050"></a>00050 <span class="comment">/* Variable -&gt; __iPositionX - Posicion X del raton  */</span>
<a name="l00051"></a>00051                 <span class="keywordtype">int</span>          __iPositionX;
<a name="l00052"></a>00052 <span class="comment">/* Variable -&gt; __iPositionY - Posicion Y del raton  */</span>
<a name="l00053"></a>00053                 <span class="keywordtype">int</span>          __iPositionY;
<a name="l00054"></a>00054 
<a name="l00055"></a>00055         <span class="keyword">public</span>:
<a name="l00056"></a>00056 <span class="comment">/* Metodo -&gt; Init ( void ) - Inicia el engine de la libreria */</span>
<a name="l00057"></a>00057                 <span class="keywordtype">void</span> <a class="code" href="class_f_g_e___motion.html#a580bf203b80d8712c78dc464b1fb4a21">Init</a>( <span class="keywordtype">char</span>* __chTitle );
<a name="l00058"></a>00058 <span class="comment">/* Metodo -&gt; newWindow ( int __x, int __y, int __bpp ); - Crea una ventana nueva */</span>
<a name="l00059"></a>00059                 FGE_Screen * <a class="code" href="class_f_g_e___motion.html#ae678237c3eb52412f79cdcf1424b26f7">Window</a> ( <span class="keywordtype">int</span> __x, <span class="keywordtype">int</span> __y, <span class="keywordtype">int</span> __bpp );
<a name="l00060"></a>00060 <span class="comment">/* Metodo -&gt; Surface ( void ); - Devuelve la superficie  */</span>
<a name="l00061"></a>00061                 FGE_Screen * <a class="code" href="class_f_g_e___motion.html#aa0a37d7dae5affb3e1a314bd1f2d910d">Surface</a> ( <span class="keywordtype">void</span> );
<a name="l00062"></a>00062 <span class="comment">/* Metodo -&gt; Refresh ( void ); - Refresca la superficie  */</span>
<a name="l00063"></a>00063                 <span class="keywordtype">void</span> <a class="code" href="class_f_g_e___motion.html#a693775ca444d08642c4694c5982dcf81">Refresh</a> ( <span class="keywordtype">void</span> );
<a name="l00064"></a>00064 <span class="comment">/* Metodo -&gt; Keyboard ( void ); - Registra los eventos del teclado  */</span>
<a name="l00065"></a>00065                 <span class="keywordtype">int</span> <a class="code" href="class_f_g_e___motion.html#addb09bbc5e51cef696915490e1936476">Keyboard</a> ( <span class="keywordtype">void</span> );
<a name="l00066"></a>00066 <span class="comment">/* Metodo -&gt; Mouse ( void ); - Registra los eventos del mouse  */</span>
<a name="l00067"></a>00067                 <span class="keywordtype">int</span> <a class="code" href="class_f_g_e___motion.html#a3bfc436dfcaba1c217b35c770c278573">Mouse</a> ( <span class="keywordtype">void</span> );
<a name="l00068"></a>00068 };
<a name="l00069"></a>00069 
<a name="l00071"></a><a class="code" href="class_f_g_e___media.html">00071</a> <span class="keyword">class </span><a class="code" href="class_f_g_e___media.html" title="Clase encargada de el manejo del apartado multimedia de la libreria.">FGE_Media</a> 
<a name="l00073"></a>00073 {
<a name="l00074"></a>00074         <span class="keyword">private</span>:
<a name="l00075"></a>00075 <span class="comment">/* Variable -&gt; __pImageBuffer - La superficie  */</span>
<a name="l00076"></a>00076                 FGE_Screen * __pImageBuffer;
<a name="l00077"></a>00077 <span class="comment">/* Variable -&gt; __bImageBox - Los caja donde se dibuja */</span>
<a name="l00078"></a>00078                 FGE_Box __bImageBox;
<a name="l00079"></a>00079 <span class="comment">/* Variable -&gt; __posX - La posicion X de la superficie */</span>
<a name="l00080"></a>00080                 <span class="keywordtype">int</span> __posX;
<a name="l00081"></a>00081 <span class="comment">/* Variable -&gt; __posY - La posicion y de la superficie */</span>
<a name="l00082"></a>00082                 <span class="keywordtype">int</span> __posY;
<a name="l00083"></a>00083 
<a name="l00084"></a>00084         <span class="keyword">public</span>:
<a name="l00085"></a>00085 <span class="comment">/* Metodo -&gt; LoadImg ( char* __chPath ) - Carga una imagen en la superficie del objeto ( __pImageBuffer )*/</span>
<a name="l00086"></a>00086                 <span class="keywordtype">int</span> <a class="code" href="class_f_g_e___media.html#a3ac4b442e646134de9d317ab801ca73f">LoadImg</a> ( <span class="keywordtype">char</span>* __chPath );
<a name="l00087"></a>00087 <span class="comment">/* Metodo -&gt; DrawImage ( int __posX, int __posY, FGE_Screen * __sSurfaceDest ) - Dibuja una imagen en la pantalla */</span>
<a name="l00088"></a>00088                 <span class="keywordtype">void</span> <a class="code" href="class_f_g_e___media.html#a76cf20ea356a2ae629bc3036407597e9">DrawImage</a> ( <span class="keywordtype">int</span> __pX, <span class="keywordtype">int</span> __pY, FGE_Screen * __sSurfaceDest );
<a name="l00089"></a>00089 <span class="comment">/* Metodo -&gt; SetColorKey ( int __r, int __g, int __b ) - Define el color de transparencia */</span>
<a name="l00090"></a>00090                 <span class="keywordtype">void</span> <a class="code" href="class_f_g_e___media.html#a1dd5a9d67676261dc72af1071f45dadc">SetColorKey</a> ( <span class="keywordtype">int</span> __r, <span class="keywordtype">int</span> __g, <span class="keywordtype">int</span> __b );
<a name="l00091"></a>00091 <span class="comment">/* Metodo -&gt; ImgWidth - Devuelve el ancho de la superficie */</span>           
<a name="l00092"></a>00092                 <span class="keywordtype">int</span> <a class="code" href="class_f_g_e___media.html#a6e3c5794566605905183c335a0b278a4">ImgWidth</a> ( <span class="keywordtype">void</span> );
<a name="l00093"></a>00093 <span class="comment">/* Metodo -&gt; ImgHeight - Devuelve el alto de la superficie */</span>
<a name="l00094"></a>00094                 <span class="keywordtype">int</span> <a class="code" href="class_f_g_e___media.html#afe28e3be822df8f34cdefbb11b38777a">ImgHeight</a> ( <span class="keywordtype">void</span> );
<a name="l00095"></a>00095 <span class="comment">/* Metodo -&gt; ImgX - Devuelve la posicion X de la superficie */</span>
<a name="l00096"></a>00096                 <span class="keywordtype">int</span> <a class="code" href="class_f_g_e___media.html#aa2b2695564a093ab71de8a5ea396f531">ImgX</a> ( <span class="keywordtype">void</span> );
<a name="l00097"></a>00097 <span class="comment">/* Metodo -&gt; ImgY - Devuelve la posicion y de la superficie */</span>
<a name="l00098"></a>00098                 <span class="keywordtype">int</span> <a class="code" href="class_f_g_e___media.html#abaa2bdedbffcf42fc9df60b48b3e515a">ImgY</a> ( <span class="keywordtype">void</span> );
<a name="l00099"></a>00099 <span class="comment">/* Metodo -&gt; Surface - Devuelve la superficie de la imagen */</span>
<a name="l00100"></a>00100                 FGE_Screen * <a class="code" href="class_f_g_e___media.html#a5dbc7b51fed81bf78fb7565cf40c37c7">Surface</a> ( <span class="keywordtype">void</span> );
<a name="l00101"></a>00101 };
<a name="l00102"></a>00102 <span class="preprocessor">#endif</span>
</pre></div></div>
<hr class="footer"/><address style="text-align: right;"><small>Generado el Sun May 16 00:58:06 2010 para FGElib por&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>
